{% extends 'host.html' %}

{% block content%}


<div class="container">
  
<table class="table table-bordered">
  <caption><h1>视频管理</h1></caption>
   <a href="/addtv/{{user.id}}" type="button" class="btn btn-info glyphicon glyphicon-plus"  >  添加</a><br><br>
<table class="table table-bordered text-center">
  <thead style="background:#EEEEEE">
  
    <tr>
      <th>序号</th>
      <th>名称</th>
      <th>介绍</th>
      <th>讲师</th>
      <th>播放次数</th>
      <th>时长</th>

      <th>编辑</th>
      <th>删除</th>
    </tr>
  </thead>
  <tbody>
    <tr>
    {% for vide in videos %}
      
      <td>{{ vide.id }}</td>
      <td>{{ vide.title }}</td>
      <td>{{ vide.abstract }}</td>
      <td>{{ vide.t_id }}</td>
      <td>{{ vide.hist }}</td>
      <td>{{ vide.time }}</td>
      <td><a class=" glyphicon glyphicon-edit " href="/tvrevise/{{vide.id}}"></a></td>
      <td><a class=" glyphicon glyphicon-trash"  href="#" onclick="removemodal('{{vide.id }}','{{vide.title}}')"></a></td>
    </tr>
    {% endfor %}
   
  </tbody>
</table>

  
</div>
<!-- 模态框 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">是否确认删除</h4>
            </div>
            <div class="modal-body"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary  remove">确认删除</button>
            </div>
        </div>
    </div>
</div>


{% endblock%}
{% block script %}


<script type="text/javascript" src='/static/dele.js'></script>
{% endblock %}